package com.pronhub.luowowo.mgrsite.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.github.pagehelper.PageInfo;
import com.pronhub.luowowo.article.query.TravelCommendQuery;
import com.pronhub.luowowo.article.service.ITravelCommendService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("travelCommend")
public class TravelCommend {

    @Reference
    private ITravelCommendService commendService;
    @RequestMapping("/list")
    public String list(Model model, @ModelAttribute("qo")TravelCommendQuery qo){
        PageInfo pageInfo = commendService.query(qo);
        model.addAttribute("pageInfo",pageInfo);
        return "travelCommend/list";
    }
}
